package com.hnichr.ump.common.doc.entity;

import java.util.List;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import com.hnichr.ump.common.entity.UmpEntity;
import com.mxpioframework.jpa.annotation.Generator;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

@Data
@EqualsAndHashCode(callSuper = false)
@Entity
@Table(name = "mb_group")
@Schema(description = "用户组表")
public class Group extends UmpEntity {
	private static final long serialVersionUID = 1103765541065900838L;

	@Id
	@Generator
	@Column(name = "RID", updatable = false)
	@Schema(description = "ID")
	private String id;

	@Column(name = "GROUP_NAME")
	@Schema(description = "组名")
	private String groupName;

	@Column(name = "VALID_FLAG")
	@Schema(description = "有效标识")
	private String validFlag;

	@Transient
	private List<GroupUser> users;
}
